#define DBC_CHECK_PRECONDITION

using System;
using System.Xml;

using DesignByContract;

using Outcoding.GraphGenerator.Entities;

namespace Outcoding.GraphGenerator.XmlBuilders {
    public class SeriesXmlBuilder : IXmlBuilder {
        
        private Series mResultObject = null;
        
        public object ResultObject {
            get {
                return mResultObject;
            }
        }

        public SeriesXmlBuilder(XmlNode seriesXmlNode) {
            Check.Require(seriesXmlNode != null, "Xml source node cannot be null");
            Check.Require(seriesXmlNode.Name.CompareTo(XmlTagNames.series.ToString()) == 0, "A Series Xml node must be supplied.");
            this.BuildObject(seriesXmlNode);
        }

        private void BuildObject(XmlNode seriesXmlNode) {
            mResultObject = new Series();
        }
    }
}
